﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vibz.TeamAssignment.Common.Entity
{
    public class TaskAssignment
    {
        public int ID
        {
            get;
            set;
        }
        public int TaskID
        {
            get;
            set;
        }
        public string AssignedTo
        {
            get;
            set;
        }
        public string AssignBy
        {
            get;
            set;
        }
        public string AssignComment
        {
            get;
            set;
        }
        public DateTime AssignRequestDate
        {
            get;
            set;
        }
        public AssignStatus AssignStatus
        {
            get;
            set;
        }
        public bool IsRequest
        {
            get;
            set;
        }
        public TaskAssignment(int taskID, string assignTo, string assignBy, bool isRequest)
            : this(taskID, assignTo, assignBy, isRequest, DateTime.Now)
        {
        }
        
        public TaskAssignment(int taskID, string assignTo, string assignBy, bool isRequest, DateTime assignDate)
            : this(taskID, assignTo, assignBy, isRequest, assignDate, "")
        {
        }
        public TaskAssignment(int taskID, string assignTo, string assignBy, bool isRequest, DateTime assignDate,               string comment)
            : this(taskID, assignTo, assignBy, isRequest, assignDate, comment, AssignStatus.Assigned)
        {
        }
        public TaskAssignment(int taskID, string assignTo, string assignBy, bool isRequest, DateTime assignDate, string comment, AssignStatus status)
            : this(taskID, assignTo, assignBy, isRequest, assignDate, comment, status, -1)
        {
        }
        public TaskAssignment(int taskID, string assignTo, string assignBy, bool isRequest, DateTime assignDate, 
            string assignComment, AssignStatus status, int id)
        {
            TaskID = taskID;
            AssignedTo = assignTo;
            AssignBy = assignBy;
            IsRequest = isRequest;
            AssignRequestDate = assignDate;
            AssignComment = assignComment;
            AssignStatus = status;
            ID = id;
        }

    }
}
